<%@codepage="65001"%>
<%session.codepage="65001"%>
<!-- #include virtual=/inc/dbConn.asp -->
<!-- #include virtual=/inc/function.asp -->
<%
	fullBillCd = Request("fullBillCd")
	divBillCd = split(fullBillCd, "-")
	if fullBillCd <> "" then 
		if divBillCd(1) <> "" then
			billCd =  divBillCd(1)
			issueDt = divBillCd(0)
			isPerms = aFieldValue("SELECT ISNULL(count(*),0) FROM tblBizBill WHERE convert(varchar(8),addDt,112)='" & issueDt & "' AND billCd=" & billCd)
			if isPerms = 0 then
				Response.write "	<META http-equiv=""Content-Type"" content=""text/html; charset=utf-8"">"				
				Response.write "이 문서는 비정상적으로 접속 하였습니다.<br> This URL is incorrect." 
				Response.end
			end if 
		else
			billCd = Request("billCd")
		end if 
	else
			billCd = Request("billCd")
	end if 

	'## 공급자(노아텍) 정보
	Set compRs=Server.CreateObject("ADODB.RecordSet")
	SQL = "SELECT company, owner, compNo, phone, addr, compPart, compType FROM tblCompany WHERE compCd=1"	
	compRs.open SQL, dbCon
	
	If compRs.eof Or compRs.bof Then 
	Else 
		Do Until compRs.eof Or compRs.bof
			company 		= compRs("company")
			owner 			= compRs("owner")
			compNo 		= compRs("compNo")
			compPart 	= compRs("compPart")
			compType 	= compRs("compType")
			phone 			= compRs("phone")
			addr 			= compRs("addr")
		compRs.movenext
		Loop 
	End If
	
	'## 거래명세서 정보
	Set bizBillRs=Server.CreateObject("ADODB.RecordSet")
	SQL = "SELECT A.incomeDt, A.income, A.orgAmount, A.tax, A.amount, A.billMemo, A.flag, B.company, B.owner, B.compNo, B.compPart, B.compType, B.addr  FROM tblIncome A LEFT JOIN tblCompany B ON A.compCd=B.compCd WHERE A.billCd=" & billCd
	bizBillRs.open SQL, dbCon
	
	If bizBillRs.eof Or bizBillRs.bof Then 
	Else 
		Do Until bizBillRs.eof Or bizBillRs.bof
			incomeDt			= bizBillRs("incomeDt")
			income 			= bizBillRs("income")
			billMemo 			= bizBillRs("billMemo")
			orgAmount 		= FormatNumber(bizBillRs("orgAmount"),0)
			tax 					= FormatNumber(bizBillRs("tax"),0)
			amount 			= FormatNumber(bizBillRs("amount"),0)
			flag	 			= bizBillRs("flag")
			clntCompany 	= bizBillRs("company")
			clntOwner	 	= bizBillRs("owner")
			clntCompNo 	= bizBillRs("compNo")
			clntCompPart 	= bizBillRs("compPart")
			clntCompType 	= bizBillRs("compType")
			clntCompAddr 	= bizBillRs("addr")
		bizBillRs.movenext
		Loop 
	End If
	
	printTime = date() & " " & time()
%>
<!-- #include virtual=/inc/header.inc.asp -->  
<script language = "JavaScript" src="/inc/js/ScriptX_TAG_SCM.js"></script>
<script>initScriptX("contexts", "100%", "100%"); </script>

<script for=window event=onload>
	printWindow(document.contexts, "<%=printTime%>");
	//self.close();
</script>


<script language="JavaScript">	 
	function printWindow(objName, DAY2) {
		var footer = "출력일시 : " + DAY2;
		objName.printing.header = "";
		objName.printing.footer = ""; //footer;
		objName.printing.portrait = true; // false 는 가로인쇄
		objName.printing.leftMargin = 15.0;
		objName.printing.topMargin = 15.0;
		objName.printing.rightMargin = 15.0;
		objName.printing.bottomMargin = 1.0;
		objName.printing.Print(false);
	}
</script>
<style>
.table_com {
	background-color: #FFFFFF;
	clear: both;
	border: 1px solid #1515FF; 
	font-size: 10px;
	line-height: 18px;
	padding: 3px 1px 3px 1px;
}
.table_com_orange {
	background-color: #FFFFFF;
	clear: both;
	border: 1px solid #ff6633; 
	border-bottom: 5px solid #ff6633; 
	font-size: 10px;
	line-height: 18px;
	padding: 3px 1px 3px 1px;
}
.table_com_cell td {
	background-color: #FFFFFF;
	clear: both;
	border-right: 1px solid #1515FF; 
	border-bottom: 1px solid #1515FF; 
	border-top: 1px solid #1515FF; 
	font-size: 11px;
	line-height: 18px;
	padding: 3px 1px 3px 1px;
}
.P_0rb0 {
	background-color: #FFFFFF;
	clear: both;
	border-right: 1px solid #1515FF; 
	border-bottom: 1px solid #1515FF; 
	font-size: 11px;
	line-height: 15px;
	padding: 3px 1px 3px 1px;
}
.P_0rbl {
	background-color: #FFFFFF;
	clear: both;
	border-right: 1px solid #1515FF; 
	border-bottom: 1px solid #1515FF; 
	border-left: 1px solid #1515FF; 
	font-size: 11px;
	line-height: 15px;
	padding: 3px 1px 3px 1px;
}
.P_trb0 {
	background-color: #FFFFFF;
	clear: both;
	border-right: 1px solid #1515FF; 
	border-bottom: 1px solid #1515FF; 
	border-top: 1px solid #1515FF; 
	font-size: 11px;
	line-height: 15px;
	padding: 3px 1px 3px 1px;
}
.P_trbl {
	background-color: #FFFFFF;
	clear: both;
	border-right: 1px solid #1515FF; 
	border-bottom: 1px solid #1515FF; 
	border-top: 1px solid #1515FF; 
	border-left: 1px solid #1515FF; 
	font-size: 11px;
	line-height: 15px;
	padding: 3px 1px 3px 1px;
}
.P_t0bl {
	background-color: #FFFFFF;
	clear: both;
	border-left: 1px solid #1515FF; 
	border-bottom: 1px solid #1515FF; 
	border-top: 1px solid #1515FF; 
	font-size: 11px;
	line-height: 15px;
	padding: 3px 1px 3px 1px;
}

hr {   
	border-width:20px 0px 0px 0px;
 	border-style:dotted;
 	border-color:#1515FF; 
 	height:1px;
 	}
</style>
 
<BODY topmargin="0" leftmargin="0">
	<table width="99.5%" cellpadding="0" cellspacing="0">
		<tr>
			<td>
				<table width="100%" cellpadding="0" cellspacing="0" border="0">
					<tr>
						<td width="35%" style="height:35px;text-align:left" valign="bottom">
							<table width="70%" cellpadding="0" cellspacing="0">
								<tr>
									<td class="P_t0bl" width="30%" style="font-size:12px; text-align:Center;padding-left:10px;">일자 </td>
									<td class="P_trb0" width="70%" style="font-size:14px; font-weight:bold;padding-left:10px;">: &nbsp; <%=incomeDt%></td>
								</tr>
							</table>
						</td>
						<td width="30%"  style="text-align:center;font-size:15pt;font-weight:bold;height:35px;color:#1515FF; border:2px solid #1515FF;">거래명세서</td>
						<td width="35%" style="height:35px;text-align:right" valign="bottom">		
							<table width="70%" cellpadding="0" cellspacing="0">
								<tr>
									<td width="100%" style="font-size:11px; text-align:right;padding-right:10px;">공급받는자 보관용 / Code : <%=billCd%> </td>
								</tr>
							</table>
						</td>
					</tr>
				</table>
			</td>
		</tr>
	</table>
	<table width="99.5%" cellpadding="0" cellspacing="0">
		<tr>
			<td style="height:10px"></td>
		</tr>
	</table>
	<table width="99.5%" cellpadding="0" cellspacing="0">
		<tr>
			<td width="50%">
				<table  width="99%" cellpadding="0" cellspacing="0">
					<tr>
						<td colspan="4" width="100%" class="P_trbl" style="text-align:center;height:28px;font-size:12px;"> 공급자</td>
					</tr>
					<tr>
						<td width="18%" class="P_0rbl" style="height:26px;font-size:10px;text-align:center">등록번호</td>
						<td width="82%" colspan="3" class="P_0rb0" style="height:26px;font-size:10px;text-align:center"><%=compNo%>&nbsp;</td>
					</tr>
					<tr>
						<td width="18%" class="P_0rbl" style="height:28px;font-size:10px;text-align:center">상호</td>
						<td width="32%" class="P_0rb0" style="height:28px;font-size:10px;text-align:center"><%=company%></td>
						<td width="18%" class="P_0rb0" style="height:26px;font-size:10px;text-align:center">성명</td>
						<td width="32%" class="P_0rb0" style="height:26px;font-size:10px;padding-left:7px;"><%=owner%></td>
					</tr>
					<tr>
						<td width="18%" class="P_0rbl" style="height:28px;font-size:10px;text-align:center">업태</td>
						<td width="32%" class="P_0rb0" style="height:28px;font-size:10px;text-align:center">&nbsp;<%=compType%></td>
						<td width="18%" class="P_0rb0" style="height:26px;font-size:10px;text-align:center">종목</td>
						<td width="32%" class="P_0rb0" style="height:26px;font-size:10px;text-align:center">&nbsp;<%=compPart%></td>
					</tr>
					<tr>
						<td width="18%" class="P_0rbl" style="height:26px;font-size:10px;text-align:center">주소</td>
						<td width="82%" colspan="3" class="P_0rb0" style="height:40px;font-size:10px;text-align:center">&nbsp;<%=addr%></td>
					</tr>
				</table>
			</td>
			<td width="50%" valign="top" align="right">
				<table  width="99%" cellpadding="0" cellspacing="0">
					<tr>
						<td colspan="4" width="100%" class="P_trbl" style="text-align:center;height:28px;font-size:12px;"> 공급받는자</td>
					</tr>
					<tr>
						<td width="18%" class="P_0rbl" style="height:26px;font-size:10px;text-align:center">등록번호</td>
						<td width="82%" colspan="3" class="P_0rb0" style="height:26px;font-size:10px;text-align:center"><%=clntCompNo%>&nbsp;</td>
					</tr>
					<tr>
						<td width="18%" class="P_0rbl" style="height:26px;font-size:10px;text-align:center">상호</td>
						<td width="32%" class="P_0rb0" style="height:26px;font-size:10px;text-align:center"><%=clntCompany%></td>
						<td width="18%" class="P_0rb0" style="height:28px;font-size:10px;text-align:center">성명</td>
						<td width="32%" class="P_0rb0" style="height:26px;font-size:10px;text-align:center"><%=clntOwner%></td>
					</tr>
					<tr>
						<td width="18%" class="P_0rbl" style="height:28px;font-size:10px;text-align:center">업태</td>
						<td width="32%" class="P_0rb0" style="height:28px;font-size:10px;text-align:center">&nbsp;<%=clntCompType%></td>
						<td width="18%" class="P_0rb0" style="height:26px;font-size:10px;text-align:center">종목</td>
						<td width="32%" class="P_0rb0" style="height:26px;font-size:10px;padding-left:7px;text-align:center">&nbsp;<%=clntCompPart%></td>
					</tr>
					<tr>
						<td width="18%" class="P_0rbl" style="height:28px;font-size:10px;text-align:center">주소</td>
						<td width="82%" colspan="3" class="P_0rb0" style="height:40px;font-size:10px;text-align:center">&nbsp;<%=clntCompAddr%></td>
					</tr>
				</table>
			</td>
		</tr>
	</table>
	<table width="99.5%" cellpadding="0" cellspacing="0">
		<tr>
			<td style="height:5px"></td>
		</tr>
	</table>		
	
	<table width="99.5%" cellpadding="0" cellspacing="0">
		<tr>
			<td width="5%" class="P_trbl" style="height:26px;font-size:10px;text-align:center;">No.</td>
			<td width="35%" class="P_trb0" style="height:26px;font-size:10px;text-align:center;">품 명</td>
			<td width="9%" class="P_trb0" style="height:26px;font-size:10px;text-align:center;">자재코드</td>
			<td width="11%" class="P_trb0" style="height:26px;font-size:10px;text-align:center;">주문번호</td>
			<td width="9%" class="P_trb0" style="height:26px;font-size:10px;text-align:center;">수량</td>
			<td width="9%" class="P_trb0" style="height:26px;font-size:10px;text-align:center;">단가</td>
			<td width="12%" class="P_trb0" style="height:26px;font-size:10px;text-align:center;">금액</td>
			<td width="10%" class="P_trb0" style="height:26px;font-size:10px;text-align:center;">세액</td>
		</tr>
<%

	'## 거래명세서 세부항목
	Set billArticleRs=Server.CreateObject("ADODB.RecordSet")
	SQL = "SELECT CASE WHEN A.prdCd>0 THEN B.prdNm ELSE A.prdNm END prdNm, A.orderPrdCd etcPrdCd, A.orderNo, A.goodQty, A.unitPrice, A.totalPrice, CAST((A.totalPrice/10) as int) tax FROM tblBizBill A " & _
		  "			LEFT JOIN tblProduct B ON A.prdCd=B.prdCd " & _
		  "WHERE A.flag='Y' AND A.billCd=" & billCd
	billArticleRs.open SQL, dbCon
	C = 1
	If billArticleRs.eof Or billArticleRs.bof Then 
	Else 
		Do Until billArticleRs.eof Or billArticleRs.bof
			prdNm = billArticleRs("prdNm")
			etcPrdCd= billArticleRs("etcPrdCd")
			orderNo= billArticleRs("orderNo")
			if orderNo ="" then 
				orderNo = "&nbsp;"
			end if 
			if etcPrdCd = "" then etcPrdCd = "&nbsp;" end if 
			
			goodQty = FormatNumber(billArticleRs("goodQty"),0)
			unitPrice = FormatNumber(billArticleRs("unitPrice"),0)
			totalPrice = FormatNumber(billArticleRs("totalPrice"),0)
			articleTax = FormatNumber(billArticleRs("tax"),0)
%>
		<tr>
			<td width="5%" class="P_0rbl" style="height:26px;font-size:10px;text-align:center;"><%=C%></td>
			<td width="35%" class="P_0rb0" style="height:26px;font-size:10px;text-align:center;"><%=prdNm%></td>
			<td width="9%" class="P_0rb0" style="height:26px;font-size:10px;text-align:center;"><%=etcPrdCd%></td>
			<td width="11%" class="P_0rb0" style="height:26px;font-size:10px;text-align:center;"><%=orderNo%></td>
			<td width="9%" class="P_0rb0" style="height:26px;font-size:10px;text-align:right;padding-right:5px;"><%=goodQty%></td>
			<td width="9%" class="P_0rb0" style="height:26px;font-size:10px;text-align:right;padding-right:5px;"><%=unitPrice%></td>
			<td width="12%" class="P_0rb0" style="height:26px;font-size:10px;text-align:right;padding-right:5px;"><%=totalPrice%></td>
			<td width="10%" class="P_0rb0" style="height:26px;font-size:10px;text-align:right;padding-right:5px;"><%=articleTax%></td>
		</tr>

<%
		C = C+1
		billArticleRs.movenext
		Loop 
	End If
%>		
		<tr>
			<td width="5%" class="P_0rbl" style="height:26px;font-size:10px;text-align:center;">&nbsp;</td>
			<td width="95%" class="P_0rb0" colspan="9" style="height:26px;font-size:10px;text-align:center;">- 이 상 -</td>
		</tr>
		<tr>
			<td width="5%" class="P_0rbl" style="height:26px;font-size:10px;text-align:center;">&nbsp;</td>
			<td width="35%" class="P_0rb0" style="height:26px;font-size:10px;text-align:center;">&nbsp;</td>
			<td width="15%" class="P_0rb0" style="height:26px;font-size:10px;text-align:center;">&nbsp;</td>
			<td width="5%" class="P_0rb0" style="height:26px;font-size:10px;text-align:center;">&nbsp;</td>
			<td width="9%" class="P_0rb0" style="height:26px;font-size:10px;text-align:center;">&nbsp;</td>
			<td width="9%" class="P_0rb0" style="height:26px;font-size:10px;text-align:center;">&nbsp;</td>
			<td width="12%" class="P_0rb0" style="height:26px;font-size:10px;text-align:center;">&nbsp;</td>
			<td width="10%" class="P_0rb0" style="height:26px;font-size:10px;text-align:center;">&nbsp;</td>
		</tr>
	</table>
	<table width="99.5%" cellpadding="0" cellspacing="0">
		<tr>
			<td style="height:5px"></td>
		</tr>
	</table>		
	<table width="99.5%" cellpadding="0" cellspacing="0">
		<tr>
			<td width="8%" class="P_trbl" style="text-align:center">공급가액</td>
			<td width="14%" class="P_trb0" style="padding-right:3px;text-align:right;font-size:12px;height:27px;"><%=orgAmount%></td>
			<td width="7%" class="P_trb0" style="text-align:center">세액</td>
			<td width="13%" class="P_trb0" style="padding-right:3px;text-align:right;font-size:12px;height:27px;"><%=tax%></td>
			<td width="7%" class="P_trb0" style="text-align:center">합계</td>
			<td width="15%" class="P_trb0" style="padding-right:3px;text-align:right;font-size:13px;font-weight:bold;height:27px;"><%=amount%></td>
			<td width="7%" class="P_trb0" style="text-align:center">미수금</td>
			<td width="11%" class="P_trb0" style="padding-right:3px;text-align:right;font-size:13px;font-weight:bold;height:27px;">&nbsp;</td>
			<td width="7%" class="P_trb0" style="text-align:center">인수자</td>
			<td width="11%" class="P_trb0" style="padding-right:3px;text-align:right;font-size:13px;font-weight:bold;height:27px;">&nbsp;</td>
		</tr>
<% if billMemo <> "" then %>		
		<tr>
			<td width="100%" colspan="10" class="P_0rbl" style="padding-left:10px;font-size:12px;height:27px;">※ <%=billMemo%></td>
		</tr>
<%	end if %>		
	</table>
	<table border="0" width="99.5%" cellpadding="0" cellspacing="0">
		<tr>
			<td valign="top" width="40%">
				<table width="99.5%" cellpadding="0" cellspacing="0">
					<tr>
						<td style="height:23px;font-size:10px">출력일시 : <%=printTime%></td>
					</tr>
				</table>
			</td>
			<td align="right" width="60%"><img src="/img/logo.jpg" width="150"></td>
		</tr>
	</table>
	<table width="99.5%" cellpadding="0" cellspacing="0">
		<tr>
			<td style="height:20px"></td>
		</tr>
		<tr>
			<td><hr></td>
		</tr>
		<tr>
			<td style="height:40px"></td>
		</tr>
	</table>		
	<table width="99.5%" cellpadding="0" cellspacing="0">
		<tr>
			<td>
				<table width="100%" cellpadding="0" cellspacing="0" border="0">
					<tr>
						<td width="35%" style="height:35px;text-align:left" valign="bottom">
							<table width="70%" cellpadding="0" cellspacing="0">
								<tr>
									<td class="P_t0bl" width="30%" style="font-size:12px; text-align:Center;padding-left:10px;">일자 </td>
									<td class="P_trb0" width="70%" style="font-size:14px; font-weight:bold;padding-left:10px;">: &nbsp; <%=incomeDt%></td>
								</tr>
							</table>
						</td>
						<td width="30%"  style="text-align:center;font-size:15pt;font-weight:bold;height:35px;color:#1515FF; border:2px solid #1515FF;">거래명세서</td>
						<td width="35%" style="height:35px;text-align:right" valign="bottom">		
							<table width="70%" cellpadding="0" cellspacing="0">
								<tr>
									<td width="100%" style="font-size:11px; text-align:right;padding-right:10px;">공급자 보관용 / Code : <%=billCd%> </td>
								</tr>
							</table>
						</td>
					</tr>
				</table>
			</td>
		</tr>
	</table>
	<table width="99.5%" cellpadding="0" cellspacing="0">
		<tr>
			<td style="height:10px"></td>
		</tr>
	</table>
	<table width="99.5%" cellpadding="0" cellspacing="0">
		<tr>
			<td width="50%">
				<table  width="99%" cellpadding="0" cellspacing="0">
					<tr>
						<td colspan="4" width="100%" class="P_trbl" style="text-align:center;height:28px;font-size:12px;"> 공급자</td>
					</tr>
					<tr>
						<td width="18%" class="P_0rbl" style="height:26px;font-size:10px;text-align:center">등록번호</td>
						<td width="82%" colspan="3" class="P_0rb0" style="height:26px;font-size:10px;text-align:center"><%=compNo%>&nbsp;</td>
					</tr>
					<tr>
						<td width="18%" class="P_0rbl" style="height:28px;font-size:10px;text-align:center">상호</td>
						<td width="32%" class="P_0rb0" style="height:28px;font-size:10px;text-align:center"><%=company%></td>
						<td width="18%" class="P_0rb0" style="height:26px;font-size:10px;text-align:center">성명</td>
						<td width="32%" class="P_0rb0" style="height:26px;font-size:10px;padding-left:7px;"><%=owner%></td>
					</tr>
				</table>
			</td>
			<td width="50%" valign="top" align="right">
				<table  width="99%" cellpadding="0" cellspacing="0">
					<tr>
						<td colspan="4" width="100%" class="P_trbl" style="text-align:center;height:28px;font-size:12px;"> 공급받는자</td>
					</tr>
					<tr>
						<td width="18%" class="P_0rbl" style="height:26px;font-size:10px;text-align:center">등록번호</td>
						<td width="82%" colspan="3" class="P_0rb0" style="height:26px;font-size:10px;text-align:center"><%=clntCompNo%>&nbsp;</td>
					</tr>
					<tr>
						<td width="18%" class="P_0rbl" style="height:26px;font-size:10px;text-align:center">상호</td>
						<td width="32%" class="P_0rb0" style="height:26px;font-size:10px;text-align:center"><%=clntCompany%></td>
						<td width="18%" class="P_0rb0" style="height:28px;font-size:10px;text-align:center">성명</td>
						<td width="32%" class="P_0rb0" style="height:26px;font-size:10px;text-align:center"><%=clntOwner%></td>
					</tr>
				</table>
			</td>
		</tr>
	</table>
	
	<table width="99.5%" cellpadding="0" cellspacing="0">
		<tr>
			<td style="height:10px"></td>
		</tr>
	</table>
	
	<table width="99.5%" cellpadding="0" cellspacing="0">
		<tr>
			<td width="5%" class="P_trbl" style="height:26px;font-size:10px;text-align:center;">No.</td>
			<td width="35%" class="P_trb0" style="height:26px;font-size:10px;text-align:center;">품 명</td>
			<td width="9%" class="P_trb0" style="height:26px;font-size:10px;text-align:center;">자재코드</td>
			<td width="11%" class="P_trb0" style="height:26px;font-size:10px;text-align:center;">주문번호</td>
			<td width="9%" class="P_trb0" style="height:26px;font-size:10px;text-align:center;">수량</td>
			<td width="9%" class="P_trb0" style="height:26px;font-size:10px;text-align:center;">단가</td>
			<td width="12%" class="P_trb0" style="height:26px;font-size:10px;text-align:center;">금액</td>
			<td width="10%" class="P_trb0" style="height:26px;font-size:10px;text-align:center;">세액</td>
		</tr>
<%

	'## 거래명세서 세부항목
	Set billArticleRs=Server.CreateObject("ADODB.RecordSet")
	SQL = "SELECT CASE WHEN A.prdCd>0 THEN B.prdNm ELSE A.prdNm END prdNm, A.orderPrdCd etcPrdCd, A.orderNo, A.goodQty, A.unitPrice, A.totalPrice, CAST((A.totalPrice/10) as int) tax FROM tblBizBill A " & _
		  "			LEFT JOIN tblProduct B ON A.prdCd=B.prdCd " & _
		  "WHERE A.flag='Y' AND A.billCd=" & billCd
	billArticleRs.open SQL, dbCon
	C = 1
	If billArticleRs.eof Or billArticleRs.bof Then 
	Else 
		Do Until billArticleRs.eof Or billArticleRs.bof
			prdNm = billArticleRs("prdNm")
			etcPrdCd= billArticleRs("etcPrdCd")
			orderNo= billArticleRs("orderNo")
			if orderNo ="" then 
				orderNo = "&nbsp;"
			end if 
			if etcPrdCd = "" then etcPrdCd = "&nbsp;" end if 
			
			goodQty = FormatNumber(billArticleRs("goodQty"),0)
			unitPrice = FormatNumber(billArticleRs("unitPrice"),0)
			totalPrice = FormatNumber(billArticleRs("totalPrice"),0)
			articleTax = FormatNumber(billArticleRs("tax"),0)
%>
		<tr>
			<td width="5%" class="P_0rbl" style="height:26px;font-size:10px;text-align:center;"><%=C%></td>
			<td width="35%" class="P_0rb0" style="height:26px;font-size:10px;text-align:center;"><%=prdNm%></td>
			<td width="9%" class="P_0rb0" style="height:26px;font-size:10px;text-align:center;"><%=etcPrdCd%></td>
			<td width="11%" class="P_0rb0" style="height:26px;font-size:10px;text-align:center;"><%=orderNo%></td>
			<td width="9%" class="P_0rb0" style="height:26px;font-size:10px;text-align:right;padding-right:5px;"><%=goodQty%></td>
			<td width="9%" class="P_0rb0" style="height:26px;font-size:10px;text-align:right;padding-right:5px;"><%=unitPrice%></td>
			<td width="12%" class="P_0rb0" style="height:26px;font-size:10px;text-align:right;padding-right:5px;"><%=totalPrice%></td>
			<td width="10%" class="P_0rb0" style="height:26px;font-size:10px;text-align:right;padding-right:5px;"><%=articleTax%></td>
		</tr>

<%
		C = C+1
		billArticleRs.movenext
		Loop 
	End If
	imgPosit = 27*cint(C) + 250
%>		
		<tr>
			<td width="5%" class="P_0rbl" style="height:26px;font-size:10px;text-align:center;">&nbsp;</td>
			<td width="95%" class="P_0rb0" colspan="9" style="height:26px;font-size:10px;text-align:center;">- 이 상 -</td>
		</tr>
		<tr>
			<td width="5%" class="P_0rbl" style="height:26px;font-size:10px;text-align:center;">&nbsp;</td>
			<td width="35%" class="P_0rb0" style="height:26px;font-size:10px;text-align:center;">&nbsp;</td>
			<td width="15%" class="P_0rb0" style="height:26px;font-size:10px;text-align:center;">&nbsp;</td>
			<td width="5%" class="P_0rb0" style="height:26px;font-size:10px;text-align:center;">&nbsp;</td>
			<td width="9%" class="P_0rb0" style="height:26px;font-size:10px;text-align:center;">&nbsp;</td>
			<td width="9%" class="P_0rb0" style="height:26px;font-size:10px;text-align:center;">&nbsp;</td>
			<td width="12%" class="P_0rb0" style="height:26px;font-size:10px;text-align:center;">&nbsp;</td>
			<td width="10%" class="P_0rb0" style="height:26px;font-size:10px;text-align:center;">&nbsp;</td>
		</tr>
	</table>
	<table width="99.5%" cellpadding="0" cellspacing="0">
		<tr>
			<td style="height:5px"></td>
		</tr>
	</table>		
	<table width="99.5%" cellpadding="0" cellspacing="0">
		<tr>
			<td width="8%" class="P_trbl" style="text-align:center">공급가액</td>
			<td width="14%" class="P_trb0" style="padding-right:3px;text-align:right;font-size:12px;height:27px;"><%=orgAmount%></td>
			<td width="7%" class="P_trb0" style="text-align:center">세액</td>
			<td width="13%" class="P_trb0" style="padding-right:3px;text-align:right;font-size:12px;height:27px;"><%=tax%></td>
			<td width="7%" class="P_trb0" style="text-align:center">합계</td>
			<td width="15%" class="P_trb0" style="padding-right:3px;text-align:right;font-size:13px;font-weight:bold;height:27px;"><%=amount%></td>
			<td width="7%" class="P_trb0" style="text-align:center">미수금</td>
			<td width="11%" class="P_trb0" style="padding-right:3px;text-align:right;font-size:13px;font-weight:bold;height:27px;">&nbsp;</td>
			<td width="7%" class="P_trb0" style="text-align:center">인수자</td>
			<td width="11%" class="P_trb0" style="padding-right:3px;text-align:right;font-size:13px;font-weight:bold;height:27px;">&nbsp;</td>
		</tr>
<% if billMemo <> "" then %>		
		<tr>
			<td width="100%" colspan="10" class="P_0rbl" style="padding-left:10px;font-size:12px;height:27px;">※ <%=billMemo%></td>
		</tr>
<%	end if %>		
	</table>
	<table border="0" width="99.5%" cellpadding="0" cellspacing="0">
		<tr>
			<td valign="top" width="40%">
				<table width="99.5%" cellpadding="0" cellspacing="0">
					<tr>
						<td style="height:23px;font-size:10px">출력일시 : <%=printTime%></td>
					</tr>
				</table>
			</td>
			<td align="right" width="60%"><img src="/img/logo.jpg" width="150"></td>
		</tr>
	</table>
<div style="position:absolute;top:85px;left:263px;width:56px;height:50px;background-color:#fff;z-index:3;border:0;padding:0;">
	<img src="/img/sign.jpg">
</div>
<!--
<div style="position:absolute;top:345px;left:273px;width:56px;height:50px;background-color:#fff;z-index:3;border:0px solid #000;padding:0;">
	<img src="/img/sign.jpg">
</div>
-->
<% if flag = "N" then %>
<div style="position:absolute;top:100px;left:190px;width:56px;height:50px;z-index:4;border:0;padding:0;">
	<span style="text-align:center;color:#ff0000;font-weight:bold;font-size:20pt;border:#FF0000 5px solid;width:300px;height:100px;padding-top:40px;margin-bottom:<%=imgPosit%>px;">----------- 폐  기 -----------</span>
	<span style="text-align:center;color:#ff0000;font-weight:bold;font-size:20pt;border:#FF0000 5px solid;width:300px;height:100px;padding-top:40px;">----------- 폐  기 -----------</span>
</div>
<% end if %>
</BODY>
</HTML>
<%session.codepage="949"%>